function overlapping = is_overlapping(speckle_center, occupied_map, X, Y, EMSD)
mask_occupied = sqrt((X - speckle_center(1)).^2 + (Y - speckle_center(2)).^2) <= EMSD/2;
overlapping = any(occupied_map & mask_occupied, 'all');
end